from django.shortcuts import render

# Create your views here.
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from django.conf import settings


class DeepSeekAnalysisAPI(APIView):
    def post(self, request):
        # Example: Analyze text data
        text_data = request.data.get('text')
        if not text_data:
            return Response({"error": "No text provided"}, status=status.HTTP_400_BAD_REQUEST)

        # Perform analysis using DeepSeek
        analysis_results = settings.DEEPSEEK_MODEL.analyze(text_data)  # Replace with actual method

        return Response({"results": analysis_results}, status=status.HTTP_200_OK)